<!DOCTYPE html>
<html lang="en">
<head>
    <title>今日数据</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <script src="https://file.ggxqce.com/web/vue.min.js"></script>

    <style>
        [v-cloak] {
            display: none;
        }

        * {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            font-size: 12px;
        }

        body {
            margin: 1px;
            background: #f8f8f8;
        }

        table {
            border-spacing: 0;
            border-collapse: collapse;
            display: table;
        }
        th{
            font-weight: bold;
        }
        table.text-center, table.text-center td, table.text-center th {
            text-align: center;
            font-size: 12px;
        }

        .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
            border: 1px solid #cbcbcd;
            height: 24px;
            position: relative;
            color:#333;
            padding: 0 4px;
        }

        table th {
            background: #f8f8f8;
        }

        .table-bordered {
            border: 1px solid #cbcbcd;
        }

        .table {
            width: 100%;
            max-width: 100%;
        }

        .hidden {
            display: none;
        }

        .lineOne, .lineTwo {
            text-align: left;
        }

        .tdColor {
            background-color: #f8f8f8;
            font-weight: bold;
        }

        .lineOne span {
            max-height: 24px;
            line-height: 24px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .lineTwo span {
            max-height: 48px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            text-align: left;
        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .clear {
            clear: both
        }

        .boxItem {
            width: 100%;
            padding: 10px;
            background: inherit;
            background-color: rgba(255, 255, 255, 1);
            border: none;
            /*border-radius: 20px;*/
            margin-bottom: 10px;
        }

        .boxItemTitle {
            color: #258AF0;
            font-size: 22px;
            font-weight: bold;
            margin-bottom: 10px;
            text-align: center;
        }

        .home {
            font-size: 14px;
            font-weight: bold;
            margin-bottom: 10px;
            height: 14px;
            line-height: 14px;
            text-align: center;
        }

        .dian-icon {
            background: url("/dist/img/dian.png") no-repeat;
            background-size: cover;
            width: 14px;
            height: 14px;
            display: inline-block;
        }

        .jiaobiao {
            position: relative;
        }

        .jiaobiao i {
            display: block;
            width: 0;
            height: 0;
            border-width: 0px 0 12px 12px;
            border-style: solid;
            border-color: transparent transparent transparent #2a8cec;
            position: absolute;
            top: 0px;
            left: 0px;
        }
        .lineImg{
            padding-top:5px !important;
            padding-bottom:5px !important;
        }
        .lineImg img{
            height: 45px;
            width: 45px;
            float: left;
            margin-right: 5px;
        }
        .newCustomer{
            background: url(/dist/img/new.png) no-repeat;
            background-size: cover;
            width: 20px;
            height: 20px;
            /*right: 0;*/
            top: 2px;
            position: absolute;
        }
    </style>
</head>
<body>
<section class="content" id="app" v-cloak style="background: #eee;padding: 20px 10px;">
    <div class="div-td-content-more"><i></i></div>
    <div class="boxItem">
        <div class="boxItemTitle">考勤</div>
        <div class="boxBoy">
            <template v-if="sign">
                <div v-if="sign.signState==1" class="home"><i class="dian-icon"></i>{{"请假。原因："+sign.startAddress}}</div>
                <div v-else-if="sign.signState==2" class="home"><span style="color:red;font-family: '宋体'">缺勤</span></div>
                <img v-if="sign.signUrl" :src="sign.signUrl"
                     alt="" style="width: 100%; height: 100%;">
                <img v-if="sign.signUrl" :src="sign.signOutUrl"
                     alt="" style="width: 100%; height: 100%;margin-top: 10px;">
            </template>
            <!--<div class="home"><i class="dian-icon"></i>常驻地：连云港海州区新海路23号</div>-->
            <!--<img src="https://office-auto.oss-cn-beijing.aliyuncs.com/images/201805/11/ab042c670e7a484db5cb6f1fb3924601.jpg"-->
                 <!--alt="" style="text-align: center;margin-left: 80px;">-->
            <!--<img src="https://office-auto.oss-cn-beijing.aliyuncs.com/images/201805/11/ab042c670e7a484db5cb6f1fb3924601.jpg"-->
                 <!--alt="" style="text-align: center;margin-left: 30px;">-->
        </div>
        <div class="clear"></div>
    </div>

    <div class="boxItem">
        <div class="boxItemTitle">今日计划</div>
        <div class="boxBoy">
            <table class="table table-bordered text-center table-width">
                <tbody>
                <tr>
                    <th  style="width: 25%;">客户姓名 </th>
                    <th style="width: 25%;">拜访方式</th>
                    <th style="width: 50%;">客户地点</th>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                <tr>
                    <td >花果山大道</td>
                    <td>面访</td>
                    <td class="lineOne"><span>花果山大道</span></td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="clear"></div>
    </div>
    <div class="boxItem">
        <div class="boxItemTitle">今日面访</div>
        <div class="boxBoy">
            <table class="table table-bordered text-center table-width">
                <tbody>
                <tr>
                    <td class="tdColor jiaobiao" style="width: 25%;"><i></i>客户姓名</td>
                    <td style="width: 25%;"><span>{{customer.name}}</span><span class="newCustomer"></span></td>
                    <td class="tdColor" style="width: 25%;">客户电话</td>
                    <td style="width: 25%;"><span>{{customer.tel}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor">客户微信</td>
                    <td ><span>{{customer.wechat}}</span></td>
                    <td class="tdColor">陪同人</td>
                    <td ><span></span></td>
                </tr>
                <tr>
                    <td class="tdColor">拜访时间</td>
                    <td ><span></span></td>
                    <td class="tdColor">拜访时长</td>
                    <td ><span></span></td>
                </tr>
                <tr>
                    <td class="tdColor">图片</td>
                    <td class="lineImg" colspan="3">
                        <img src="https://office-auto.oss-cn-beijing.aliyuncs.com/images/201805/11/ab042c670e7a484db5cb6f1fb3924601.jpg"
                             alt="" >
                    </td>

                </tr>
                <tr>
                    <td class="tdColor">基本情况</td>
                    <td colspan="3" class="lineTwo"><span>{{customer.OtherCondition}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor"  colspan="3">考勤签到时间与拜访时间 时间间隔</td>
                    <td>60分</td>
                </tr>
                <tr>
                    <td class="tdColor"  colspan="3">考勤签到地点与拜访地点 距离间隔</td>
                    <td>11公里</td>
                </tr>
                <tr>
                    <td class="tdColor"  colspan="3">时速</td>
                    <td>11公里/小时</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="clear"></div>
    </div>
    <div class="boxItem">
        <div class="boxItemTitle">意向客户</div>
        <div class="boxBoy">
            <table class="table table-bordered text-center table-width">
                <tbody>
                <tr>
                    <td class="tdColor jiaobiao" style="width: 25%;"><i></i>客户姓名</td>
                    <td  style="width: 25%;"><span>{{customer.name}}</span></td>
                    <td class="tdColor" style="width: 25%;">客户电话</td>
                    <td  style="width: 25%;"><span>{{customer.tel}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor">客户等级</td>
                    <td ><span>{{customer.grade}}</span></td>
                    <td class="tdColor">客户微信</td>
                    <td ><span>{{customer.wechat}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor">客户生日</td>
                    <td ><span>{{customer.birthday}}</span></td>
                    <td class="tdColor">客户所在地</td>
                    <td ><span>{{customer.provinceName}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor">意向机型</td>
                    <td ><span>{{customer.intentionModel}}</span></td>
                    <td class="tdColor">购买方式</td>
                    <td ><span>{{customer.buyType}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor">基本情况</td>
                    <td colspan="3" class="lineTwo"><span>{{customer.OtherCondition}}</span></td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="clear"></div>
    </div>
    <div class="boxItem">
        <div class="boxItemTitle">微信转发</div>
        <div class="boxBoy">
            <table class="table table-bordered text-center table-width">
                <tbody>
                <tr>
                    <th  style="width: 25%;"><i></i>日期</th>
                    <th style="width: 25%;">转发标题</th>
                    <th style="width: 50%;">转发</th>
                </tr>
                <tr v-for="(item,i) in wechat.list">
                    <!--<td>{{i+1}}</td>-->
                    <td :rowspan="item.shareDatespan" :class="{hidden: item.shareDatedis}">
                        {{(item.shareDate).substr(5,10)}}
                    </td>

                    <td class="lineOne"><span>{{item.name}}</span></td>
                    <td>
                        <i v-if="item.nightFlag==1">
                            <img style="width: 18px;" src="/dist/img/ic_app_right.png">
                        </i>
                        <i v-else-if="item.nightFlag==0||item.nightFlag=='-'">
                            <img style="width: 18px;" src="/dist/img/ic_app_worng.png">
                        </i>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="clear"></div>
    </div>
    <div class="boxItem">
        <div class="boxItemTitle">微信好友</div>
        <div class="boxBoy">
            <table class="table table-bordered text-center table-width">
                <tbody>
                <tr>
                    <th  style="width: 25%;"><i></i>日期</th>
                    <th style="width: 25%;">好友数</th>
                    <th style="width: 50%;">今日新增</th>
                </tr>
                <tr >
                    <td >05-14</td>
                    <td>2000</td>
                    <td>2</td>
                </tr>
                <tr >
                    <td >05-13</td>
                    <td>2000</td>
                    <td>2</td>
                </tr>
                <tr >
                    <td >05-12</td>
                    <td>2000</td>
                    <td>2</td>
                </tr>
                <tr >
                    <td >05-11</td>
                    <td>2000</td>
                    <td>2</td>
                </tr>
                <tr >
                    <td >05-10</td>
                    <td>2000</td>
                    <td>2</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="clear"></div>
    </div>
    <div class="boxItem">
        <div class="boxItemTitle">今日费用</div>
        <div class="boxBoy">
            <table class="table table-bordered text-center table-width">
                <tbody>
                <tr>
                    <td class="tdColor jiaobiao" style="width: 25%;"><i></i>费用类型</td>
                    <td style="width: 25%;"><span>{{customer.name}}</span></td>
                    <td class="tdColor" style="width: 25%;">申请人</td>
                    <td style="width: 25%;"><span>{{customer.tel}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor">车牌号</td>
                    <td ><span>{{customer.wechat}}</span></td>
                    <td class="tdColor">公里数</td>
                    <td ><span></span></td>
                </tr>
                <tr>
                    <td class="tdColor">金额(元)</td>
                    <td colspan="3" ><span>360.00</span></td>
                </tr>
                <tr>
                    <td class="tdColor">有无发票</td>
                    <td colspan="3" ><span>有</span></td>
                </tr>
                <tr>
                    <td class="tdColor">说明</td>
                    <td colspan="3" class="lineTwo"><span>{{customer.OtherCondition}}</span></td>
                </tr>
                <tr>
                    <td class="tdColor">附件</td>
                    <td class="lineImg" colspan="3">
                        <img src="https://office-auto.oss-cn-beijing.aliyuncs.com/images/201805/11/ab042c670e7a484db5cb6f1fb3924601.jpg"
                             alt="" >
                    </td>

                </tr>
                </tbody>
            </table>
        </div>
        <div class="clear"></div>
    </div>
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="/dist/plugins/scroll/myScroll.js"></script>
<!--框架已定义 JS-->
<!--oa自定义  JS-->
<script src="/dist/js/oaApp.js"></script>

<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script>
    $(function () {
        $("body").on("click", ".lineOne", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {
                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
</script>
<script>
//    $.ajaxSetup({
//        global: true,
//        type: "POST",
//        cache: false,
//        dataType: "json",
//        contentType: 'application/json;charset=utf-8',
//        beforeSend: function () {
//        },
//        complete: function () {
//
//        },
//        error: function (e) {
//            alert('error' + e.responseText);
//        }
//    });
    $.extend($.wyui, {
        postMethod: function (url, data, callback, sync, id) {
            if (!id) {
                id = "#app"
            }
            $.ajax({
                url: server.ip + url,
                async: sync ? false : true,
                data: JSON.stringify(data),
                beforeSend: function () {

                },
                complete: function () {
                    setTimeout(function () {
                    }, 1000);

                },
                success: function (r) {
                    if (!r.e.code) {
                        callback(r.data.sendData);
                    } else {
                        alert(r.e.desc);
                    }
                },
                error: function (e) {
                    alert(url + e.responseText);
                }
            });
        },
    });
</script>
<script type="text/javascript">
    var app = new Vue({
        el: '#app',
        data: {
            userId: getUrlParamObj().userId,
            yesterday: new Date(new Date() - 24 * 60 * 60 * 1000).Format("yyyy-MM-dd"),
            today: new Date().Format("yyyy-MM-dd"),//今天
            hour: new Date().getHours(),
            thisMonth: new Date().Format("yyyy-MM"),
            thisWeek: new Date().Format("yyyy-MM-dd") + "-w",
            wechat: {
                time: getUrlParamObj().dateTime,
                list: [{
                    "companyId": "20171216174747FEAED47B7D5A930A0E",
                    "contact": 1493,
                    "createTime": 1526116714000,
                    "createUserId": "201801220951498999371508B8CBCD85",
                    "createUserName": "郝文博",
                    "forwardNumber": 1,
                    "id": "2018051217184880BAAE6FA4075D72D9",
                    "imageUrl": "http://res.eqxiu.com/o_1c96i30fqpdq1m82o8a7jmkl99.png",
                    "img": "https://office-auto.oss-cn-beijing.aliyuncs.com/images/201805/13/72ed331694e943d7a615c5a62acc8075.png",
                    "linkUrl": "https://a.eqxiu.com/s/dDz6g8CY",
                    "morningFlag": false,
                    "name": "新形势下如何让你的料场提高产量降低成本提高效率",
                    "nightFlag": true,
                    "noonFlag": false,
                    "shareDate": "2018-05-13",
                },{
                    "companyId": "20171216174747FEAED47B7D5A930A0E",
                    "contact": 1493,
                    "createTime": 1526116714000,
                    "createUserId": "201801220951498999371508B8CBCD85",
                    "createUserName": "郝文博",
                    "forwardNumber": 1,
                    "id": "2018051217184880BAAE6FA4075D72D9",
                    "imageUrl": "http://res.eqxiu.com/o_1c96i30fqpdq1m82o8a7jmkl99.png",
                    "img": "https://office-auto.oss-cn-beijing.aliyuncs.com/images/201805/13/72ed331694e943d7a615c5a62acc8075.png",
                    "linkUrl": "https://a.eqxiu.com/s/dDz6g8CY",
                    "morningFlag": false,
                    "name": "新形势下如何让你的料场提高产量降低成本提高效率",
                    "nightFlag": true,
                    "noonFlag": false,
                    "shareDate": "2018-05-13",
                },{
                    "companyId": "20171216174747FEAED47B7D5A930A0E",
                    "contact": 1493,
                    "createTime": 1526116714000,
                    "createUserId": "201801220951498999371508B8CBCD85",
                    "createUserName": "郝文博",
                    "forwardNumber": 1,
                    "id": "2018051217184880BAAE6FA4075D72D9",
                    "imageUrl": "http://res.eqxiu.com/o_1c96i30fqpdq1m82o8a7jmkl99.png",
                    "img": "https://office-auto.oss-cn-beijing.aliyuncs.com/images/201805/13/72ed331694e943d7a615c5a62acc8075.png",
                    "linkUrl": "https://a.eqxiu.com/s/dDz6g8CY",
                    "morningFlag": false,
                    "name": "新形势下如何让你的料场提高产量降低成本提高效率",
                    "nightFlag": true,
                    "noonFlag": false,
                    "shareDate": "2018-05-13",
                }],
                reportShare: {Forward: 0, FinishForward: 0, NoForward: 0}
            },
            customer: {
                "OtherCondition": "洋马80，在停车厂停放，钩机没干活，暂时没有购机计划。",
                "birthday": "",
                "buyDate": "",
                "buyType": "",
                "cityName": "七台河",
                "countyName": "勃利县",
                "existingDevice": "洋马80",
                "fundCondition": "资金一般",
                "idCard": "",
                "intentionModel": "",
                "name": "鲍云龙",
                "provinceName": "黑龙江",
                "source": "销售录入",
                "tel": "13846433066",
                "wechat": "13846433066"
            }
        },
        methods: {
            //查看签到、签退相片
            openImg: function (url) {
                top.$.dialog({
                    title: '图片详情',
                    content: 'url:/page/showImg.html?url=' + url,
                    height: 500,
                    max: true,
                    min: false,
                    lock: true
                }).max();
            },
            isActive: function (item) {
                var that = this;
                if (that.wechat.time == item) {
                    return true;
                }
            },
            //获取合计
            getCount: function (arr, key) {
                var number = 0;
                for (var i = arr.length - 1; i >= 0; i--) {
                    number += (arr[i][key] && arr[i][key] != '-' ? arr[i][key] : 0)

                }
                return number;
            },
            //合并单元格
            tablesMergeCell: function (list) {
                for (field in list[0]) {
                    var k = 0;
                    while (k < list.length) {
                        list[k][field + 'span'] = 1;
                        list[k][field + 'dis'] = false;
                        for (var i = k + 1; i <= list.length - 1; i++) {
                            if (list[k][field] == list[i][field] && list[k][field] != '') {
                                list[k][field + 'span']++;
                                list[k][field + 'dis'] = false;
                                list[i][field + 'span'] = 1;
                                list[i][field + 'dis'] = true;
                            } else {
                                break;
                            }
                        }
                        k = i;
                    }
                }
                return list;
            },
            get_wechatCompany: function () {
                var that = this;
                $.wyui.postMethod(urlConfig.report.wechatShareRegion.getForDepartBycompanyId, {
                    "companyId": that.companyId,
                    "dateTime": that.wechat.time,
                    "userId": getUrlParamObj().userId
                }, function (data) {
                    var data = trimRN2(data);
                    that.wechat.list = that.tablesMergeCell(data);
                    if (data.length == 0) {
                        that.get_wechatCompany2()
                    }
                }, false, "#wechatCompany");
                $.wyui.postMethod(urlConfig.report.wechatShareRegion.getWechatTotalforDepartByCompanyId, {
                    "companyId": that.companyId,
                    "dateTime": that.wechat.time,
                    "userId": getUrlParamObj().userId
                }, function (data) {
                    var data = trimRN2(data);
                    that.wechat.reportShare = data;
                });
            },
            get_wechatCompany2: function () {
                var that = this;
                $.wyui.postMethod(urlConfig.report.wechatShareRegion.getForCompanyByUserIdAndDateTime, {
                    "dateTime": that.wechat.time,
                    "userId": getUrlParamObj().userId
                }, function (data) {
                    var data = trimRN2(data);
                    that.wechat.list = that.tablesMergeCell(data);
                }, false, "#wechatCompany");
                $.wyui.postMethod(urlConfig.report.wechatShareRegion.getWechatTotalforCompany, {
                    "dateTime": that.wechat.time,
                    "userId": getUrlParamObj().userId
                }, function (data) {
                    var data = trimRN2(data);
                    that.wechat.reportShare = data;
                });
            }

        },
        mounted: function () {
            var that = this;

        }
    });
</script>
</body>
</html>